summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2019-04-21 09:45:50 +0200
committerHans de Graaff <graaff@gentoo.org>2019-04-21 09:45:50 +0200
commit0d9b2338f96f7316de557542622856734251332e (patch)
treeedfb9ce8bbe6a427701007803c963d0324232a89 /dev-ruby/rrdtool-bindings
parentdev-ruby/rubygems: remove vulnerable versions (diff)
downloadgentoo-0d9b2338f96f7316de557542622856734251332e.tar.gz
gentoo-0d9b2338f96f7316de557542622856734251332e.tar.bz2
gentoo-0d9b2338f96f7316de557542622856734251332e.zip
dev-ruby/rrdtool-bindings: EAPI=6
Bug: https://bugs.gentoo.org/677332 Signed-off-by: Hans de Graaff <graaff@gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11
Diffstat (limited to 'dev-ruby/rrdtool-bindings')
-rw-r--r--dev-ruby/rrdtool-bindings/rrdtool-bindings-1.7.1-r1.ebuild60
1 files changed, 60 insertions, 0 deletions
diff --git a/dev-ruby/rrdtool-bindings/rrdtool-bindings-1.7.1-r1.ebuild b/dev-ruby/rrdtool-bindings/rrdtool-bindings-1.7.1-r1.ebuild
new file mode 100644
index 000000000000..f94871670af8
--- /dev/null
+++ b/dev-ruby/rrdtool-bindings/rrdtool-bindings-1.7.1-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+USE_RUBY="ruby24 ruby25 ruby26"
+RUBY_FAKEGEM_TASK_DOC=""
+inherit ruby-ng
+
+MY_P=${P/-bindings}
+MY_P=${MY_P/_/-}
+
+DESCRIPTION="Ruby bindings for rrdtool"
+HOMEPAGE="https://oss.oetiker.ch/rrdtool/"
+SRC_URI="${HOMEPAGE}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 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="graph test"
+REQUIRED_USE="test? ( graph )"
+
+# Block on older versions of rrdtool that install the bindings themselves.
+# requires rrd_xport which requires rrd_graph
+RDEPEND="
+ ~net-analyzer/rrdtool-${PV}[graph=]
+"
+DEPEND="
+ test? ( ~net-analyzer/rrdtool-${PV}[graph] )
+"
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.4.8-graph-ruby.patch
+}
+
+each_ruby_configure() {
+ rm ../../src/rrd_config.h || die
+ touch ../../src/rrd_config.h || die
+
+ ${RUBY} extconf.rb \
+ --with-cflags="${CFLAGS} $(usex graph -DHAVE_RRD_GRAPH -UHAVE_RRD_GRAPH)" || die
+}
+
+each_ruby_compile() {
+ emake V=1 ABS_TOP_SRCDIR="${PWD}/../.."
+}
+
+each_ruby_test() {
+ if use graph; then
+ ${RUBY} -I. test.rb || die
+ fi
+}
+
+all_ruby_install() {
+ dodoc CHANGES README
+}
+
+each_ruby_install() {
+ DESTDIR=${D} emake install
+}